package io.github.biezhi.elves.main;

import javax.annotation.Resource;
import io.github.biezhi.elves.spider.HotelSpider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 爬虫百度拾取坐标系统入口类
 *
 */
@Configuration
public class HotelMain {
	@Resource
	private HotelSpider hotelSpider;
	private static HotelSpider staticHotelSpider;
	
	@Bean
	public HotelSpider getHotelSpiderBean(){
		if(hotelSpider!=null){
			staticHotelSpider = hotelSpider;
			return staticHotelSpider;
		}
		return null;
	}
	
	/**
	 * 开始执行爬虫百度拾取坐标系统操作
	 * @throws Exception 
	 */
	public void startBaiduHotel() throws Exception{
		staticHotelSpider.startBaiduHotel();
	}
}